package com.rran.study.designpattern.structural.adapter;


import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @author yy
 * @Type Test.java
 * @Desc
 */
public class Test {

    public static void main(String[] args) {
        System.out.println("版本1时,只能将map作为参数");
        MyService myService = new MyService();
        Map map = myService.getMemberMap();
        new MyService().saveMember(map);


        System.out.println("版本2时,加入适配器,可以将List作为参数");
        List<String> member = new ArrayList<>();
        member.add("1");
        member.add("1");
        member.add("1");
        ListAdapter listAdapter = new ListAdapter(member);
        new MyService().saveMember(listAdapter);

    }
}